using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HomeDms.Properties;

namespace HomeDms
{
    public partial class ActionsForm : Form
    {
        
        public ActionsForm()
        {
            InitializeComponent();
        }

        private void DoItButton_Click(object sender, EventArgs e)
        {
            Close();
            if (NewDocumentRadioButton.Checked)
            {
                //using (DocumentForm ndf = new DocumentForm())
                //{
                //    ndf.LayoutMode = DocumentForm.Layouts.Edit;
                //    ndf.ShowDialog(DocumentListForm.TheDocumentListForm);
                //    return;
                //}
                DocumentListForm.TheDocumentListForm.newToolStripButton.PerformClick();
            }
            if (FindDocumentRadioButton.Checked)
            {
                DocumentListForm.TheDocumentListForm.findToolStripButton.PerformClick();
            }
            if (BackupRadioButton.Checked)
            {
                DocumentListForm.TheDocumentListForm.backupToolStripMenuItem.PerformClick();
            }
            
        }

        private void ActionsForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            Settings.Default.Save();
        }

        private void ActionsForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
                Close();
        }

        private void AdvancedRadioButton_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void BackupRadioButton_CheckedChanged(object sender, EventArgs e)
        {

        }
    }
}